package com.fofia.iotweb.web.domain.models;


import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.noear.snack.annotation.ONodeAttr;

import java.io.Serializable;
import java.util.Date;

/**
 * 测温盘点标签
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(value = "tags_data")
public class SmartTag implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 数据id
     */
    @Id(keyType = KeyType.None)
    @Column(value = "record_id")
    @ONodeAttr(name = "record_id")
    private int recordId;

    /**
     * 数据id
     */
    @Column(value = "sub_id")
    @ONodeAttr(name = "sub_id")
    private int subId;

    /**
     * 运动时长 秒
     */
    @Column(value = "sport")
    @ONodeAttr(name = "sport")
    private int sport;

    /**
     * 运动时长 秒
     */
    @Column(value = "sport_time")
    @ONodeAttr(name = "sport_time")
    private int sportTime;
    /**
     * 剧烈运动时长 秒
     */
    @Column(value = "intense_sport")
    @ONodeAttr(name = "intense_sport")
    private int intenseSport;

    /**
     * 反刍时长 秒
     */
    @Column(value = "ruminate_time")
    @ONodeAttr(name = "ruminate_time")
    private int ruminateTime;

    /**
     * 温度  单位：。01℃
     */
    @Column(value = "temperature")
    private float temperature;

    /**
     * 电压 mV
     */
    @Column(value = "voltage")
    private int voltage;

    /**
     * 上传时间
     */
    @Column(value = "upload_time")
    @ONodeAttr(name = "upload_time",format="yyyy-MM-dd HH:mm:ss.SSS")
    private Date uploadTime;

    /**
     * 信号rssi
     */
    @Column(value = "rssi")
    @ONodeAttr(name= "rssi")
    private int rssi;

    /**
     * 网关编号
     */
    @Column(value = "gateway_id")
    @ONodeAttr(name= "gateway_mac")
    private String gatewayMac;

    /**
     * 标签id
     */
    @Column(ignore=true)
    @ONodeAttr(name= "tag_id")
    private String tagId;

    /**
     * 普通运动时长 秒  总时长-剧烈运动-饮食
     */
    @Column(ignore=true)
    @ONodeAttr(name = "sport_fix_time")
    private int sportFixTime;

}
